﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright company="Microsoft Corp." file="IHpcSchedulerServiceClient.cs">
//   All rights reserved. See License.txt in the project root for license information.
// </copyright>
// 
// --------------------------------------------------------------------------------------------------------------------
namespace HpcSchedulerManagement
{
    using System.Collections.Generic;
    using System.Net;
    using System.Threading.Tasks;

    using DataContracts;

    using RestClient;

    public interface IHpcSchedulerServiceClient
    {
        Task<int> CreateJob(string hpcClusterName, SchedulerJob job, RequestOptions requestOptions = null);

        Task<int> CreateJob(string hpcClusterName, IDictionary<string, object> properties, RequestOptions requestOptions = null);

        Task<IList<SchedulerJob>> ListJobs(string hpcClusterName, IEnumerable<string> properties, RequestOptions requestOptions = null);

        Task<SchedulerJob> GetJob(string hpcClusterName, int jobId, IEnumerable<string> properties, RequestOptions requestOptions = null);

        Task CancelJob(string hpcClusterName, int jobId, string cancellationMessage, bool forced = false, RequestOptions requestOptions = null);

        Task<int> CreateTask(string hpcClusterName, int jobId, SchedulerTask task, RequestOptions requestOptions = null);

        Task<int> CreateTask(string hpcClusterName, int jobId, IEnumerable<string> properties, RequestOptions requestOptions = null);

        Task<IList<SchedulerTask>> ListTasks(string hpcClusterName, int jobId, IEnumerable<string> properties, RequestOptions requestOptions = null);

        Task<SchedulerTask> GetTask(string hpcClusterName, int jobId, int taskId, IEnumerable<string> properties, RequestOptions requestOptions = null);

        Task SubmitJob(string hpcClusterName, int jobId, SchedulerJob job, NetworkCredential credential, RequestOptions requestOptions = null);
    }
}